<!--
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-10-08 13:09:31
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-10-09 11:37:32
 * @FilePath: \app\src\views\el\css\declareColor\ElSelectColor.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div style="--bgColor: #fffccc">
    <el-select
      v-model="value"
      placeholder="请选择"
      popper-class="declare-color-select"
      style="--bgColor: #fffccc"
    >
      <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      >
      </el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  data() {
    return {
      options: [
        {
          value: "red",
          label: "黄金糕",
        },
        {
          value: "#fffccc",
          label: "双皮奶",
        },
      ],
      value: "",
    };
  },
};
</script>

<style>
.declare-color-select {
  background-color: var(-bgColor);
}
</style>